#pragma once

#include <QObject>
#include <QAbstractNativeEventFilter>

// Windows 全局热键管理器（其他平台提供空实现）
class GlobalHotkeyManager : public QObject, public QAbstractNativeEventFilter {
    Q_OBJECT

public:
    explicit GlobalHotkeyManager(QObject* parent = nullptr);
    ~GlobalHotkeyManager() override;

    // 注册/注销热键
    bool registerScreenshotHotkey();        // Ctrl+Alt+S
    bool registerGhostModeHotkey();         // Alt+Shift+L
    void unregisterAll();

    // QAbstractNativeEventFilter
    bool nativeEventFilter(const QByteArray& eventType, void* message, qintptr* result) override;

signals:
    void screenshotHotkeyPressed();
    void ghostModeHotkeyPressed();

private:
    bool m_registeredScreenshot = false;
    bool m_registeredGhost = false;
    int m_screenshotId = 1; // Alt+W
    int m_ghostId = 2;      // Alt+Shift+L
};
